<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://imaboy.gitee.io/universal-ico/favicon.ico" >
    <title>我的手表</title>
    <style>
		 a{text-decoration:none;color: blue;}
        a:hover{text-decoration:none;color: blue;}
        .container1{
            flex-direction: column;
            display: flex;
            justify-content: center;
            align-items: center;   
            left: 0px;
            top:0px;         
            width: 454px;
            height: 454px;
			border: 25px solid black;
            background-color: black;
			background-image: url(image/human.gif);
			background-size:200px 200px;
            border-radius: 50%;
        }     
        .box {
            color: blue;
            font-size: 1.4rem;
            text-align: center;
        }
		.txt{
			color: blue;
            font-size: 6rem;
            text-align: center;
		}
		#chart{
			width: 390px;
			height: 240px;
		}
		.index{
			color: blue;
            font-size: 2rem;
            text-align: center;
		}
    </style>
</head>

<body>
    <div class="container1">  
        <div class="box">
			 <canvas id="chart" ></canvas>
            <p class="one" id="one">最小：<nobr id="min"></nobr>&nbsp;&nbsp;&nbsp;&nbsp;平均：<nobr id="two"></nobr>&nbsp;&nbsp;&nbsp;&nbsp;最大：<nobr id="max"></nobr></p>
			<p class="index"><a href="index.html">返回首页</a></p>
        </div>
    </div>
    <script>    
        var arr=[];
function suiji(min,max){
    return Math.floor(Math.random()*(max-min+1))+min;
}
var min=100;
var max=90;
var adv=0;
for(var i=0;i<60;i++){
        arr[i]=suiji(90,100);
        var r=i+1;
        if(max<arr[i]){max=arr[i]}
        if(min>arr[i]){min=arr[i]}
		adv=adv+arr[i];
        console.log("第"+r+"个为"+arr[i]);
        console.log("第"+r+"个最大为"+max);
        console.log("第"+r+"个最小为"+min);
		console.log("平均为："+Math.floor(adv/60));
	document.getElementById("two").innerHTML=Math.floor(adv/60);
	document.getElementById("max").innerHTML=max;
	document.getElementById("min").innerHTML=min;
    }setTimeout(tz,10000);
		function tz(){
		location.href='index.html';}
    </script>
	<script src='js/chart.min.js'></script>
	<script>
	var ctx = document.getElementById("chart").getContext('2d');
		shu=[];
    for(var i=1;i<=60;i++){shu.push(i)};
	 var myChart = new Chart(ctx,{
        type:'line',
        data:{
            labels:shu,
            datasets:[{
                label:'血氧饱和度',
                backgroundColor:'green',
                borderColor:'pink',
                data:arr,
            }]
        },
        options:{
            xAxis:{},
            yAxis:{
                min:90,
                max:100
            },
        }
    })
	</script>
</body>



</html>